

<style>
.clear span:hover{
	cursor:pointer;
	color:inherit;
	background:none; 
}
.whole_pic img{ background:#FC3}

</style>
<div class="subnav">
    <ul class="crumbs">
        <li>我的位置：</li>
        <li><a href="{$site_url}">{$site_name} </a> </li>
        <li><a href="{$Categorys[$catid]['url']}">&nbsp; &gt; {$Categorys[$catid]['catname']} </a></li>
       
        <div class="clear"></div>
    </ul>
 
</div>
<div class="main">

    <table class="classify">
        <tr>
            <th>品牌：</th>
            <td ><a href="{:unsetParam('brandid',$url_s)}"<?php if(empty($_GET['brandid'])){ ?> class="whole" <?php } ?> href="">全部</a> </td> 
            
            <td  class="win_ind" ><ul class="brand" >
                   
                <YP:list name="Brand"  id="r" order="listorder asc" limit="50">
                    <li style="width:130; height:80px; text-align:center"><a class="thumb" href="{:unsetParam('brandid',$url_s)}&brandid={$r['id']}"><img <?php if($_GET['brandid']==$r['id']){ ?> style="border:#604328 solid 3px;" <?php } ?> src="{$r['pic']}" alt="" /></a></li>
                </YP:list>
                
                
            </ul></td>
            
            
        </tr>
        <!--<tr> 
            <th>空间：</th>
            <td><ul>
                <li><a href="{:unsetParam('itemType',$url_s)}" <?php if(empty($_GET['itemType'])){ ?> class="whole" <?php }?>>不限</a></li>
                    <YP:list name="Label" where="genre=17" id="r" order="listorder asc" limit="50">
                        <li><a <?php if($_GET['itemType']==$r['id']){ ?> class="whole" <?php } ?> href="{:unsetParam('itemType',$url_s)}&itemType={$r['id']}">{$r['title']}</a></li>
                    </YP:list>
                <div class="clear"></div>
            </ul></td>
        </tr>-->
        <tr> 
            <th>设备：</th>
            <td width="60"> <li><a href="{:unsetParam('device',$url_s)}" <?php if(empty($_GET['device'])){ ?> class="whole" <?php }?>>不限</a></li></td>
            <td><ul style="border-bottom: none;">
           
                <YP:list name="Label" where="genre=20" order="listorder asc" id="r" limit="50">
                    <li><a <?php if($_GET['device']==$r['id']){ ?> class="whole" <?php } ?> href="{:unsetParam('device',$url_s)}&device={$r['id']}">{$r['title']}</a></li>
                </YP:list>
                <div class="clear"></div>
            </ul></td>
        </tr>
    </table>
    <div class="left">
        <div class="slideTxtBox">
            <div class="hd">

                <!-- 下面是前/后按钮代码，如果不需要删除即可 
                <span class="arrow"><a class="next"></a><a class="prev"></a></span>
-->
                <ul><a href="{:unsetParam('order',$url_s)}"> <li <?php if(empty($_GET['order'])){ ?> class="on" <?php } ?>>默认排序</li></a>
                   <a href="{:unsetParam('order',$url_s)}&order=hits"> <li <?php if($_GET['order']=='hits'){ ?> class="on" <?php } ?> >点击数 &nbsp; <img src="../Public/images/down.png" alt="" /></li></a>
                    <a href="{:unsetParam('order',$url_s)}&order=price"><li <?php if($_GET['order']=='price'){ ?> class="on" <?php } ?> >价格 &nbsp; <img src="../Public/images/down.png" alt="" /></li></a>
                    <a href="{:unsetParam('order',$url_s)}&order=createtime"><li <?php if($_GET['order']=='createtime'){ ?> class="on" <?php } ?> >发布时间 &nbsp; <img src="../Public/images/down.png" alt="" /></li></a></ul>
            </div>
            <div class="bd">
                <ul>
                    <volist name="list"  id="r" >
                    <?php $brand = M('Brand')->where('id='.$r['brandid'])->find(); ?>
                        <li class="yuan">
                       
                            <div style="width:280px;height:328px;"> <a href="index.php?m=Product&a=show&id={$r['id']}"><img width="280" height="328" src="{$r['picture']}" /> </a></div>
                            <span class="date"><a href="index.php?m=Product&a=index&id=6&brandid={$brand['id']}"><img src="{$brand['pic_mix']}" alt="" /></a></span>
                            <h4><a href="index.php?m=Product&a=show&id={$r['id']}">
                               {$r['title']|str_cut=###,42}
                            </a></h4>
                            <p class="samp"><a href="javascript:onclick=keep({$r.id})" ><span class="keep_n{$r.id}">{$r.keep_num}</span></p></a>
                            <p><img src="../Public/images/red.png" alt="" /> &nbsp; <a href="index.php?m=Product&a=index&id=6&brandid={$brand['id']}">{$brand['name']|str_cut=###,12}</a> <span>{$r.com_num}</span></p>
                       
                        </li>
                    </volist>

                    <div class="clear"></div>
                </ul>

            </div>
        </div>
        <!--script type="text/javascript">jQuery(".slideTxtBox").slide({trigger:"click"});</script-->


        <ul class="paging" style=" height:30px; text-align:center">
            <ul>
           {$pages}
           </ul>
        </ul>
    </div>
    <div class="right" style="width:282px; margin-left:28px;">
        <ul class="hot">
        <h6><img src="../Public/images/hot.png" alt="" /> &nbsp; 热门商品推荐</h6>

        <YP:list name="Product" where="hot!='0'"  catid="6" id="r" limit="4">
            <li>
                <a href="{$r['url']}">
                 <div style="width:280px;height:328px; background:url({$r['picture']}) center no-repeat; "></div>
                 <p>{$r['title']|str_cut=###,30}      <samp class="samp"></samp></p>
                </a>
            </li>
        </YP:list>
 
        </ul>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    //搜索排序后分页
    $(document).ready(function(){
        var url=window.location.href;
        url=delQueStr(url, 'p');
        url = url.substr(url.indexOf('?') + 1);
        var zurl='<?php echo $Categorys[$catid]["url"] ?>';
        var str = zurl.substr(zurl.indexOf('?') + 1);
        url=url.replace(str,"");
        //  alert(url);

        $(".paging a").each(function(){;
            var turl=$(this).attr("href");
            $(this).attr("href",turl+url);
        });
    });



</script>
<script>
function  keep(id){
	
	
		  var module='Product';
		 
		  var url=window.location.search;
		  url='index.php'+url;
		  var title=$(".wind_produtitle").html();
		 
      //alert(title);
		  //var userid=$("#keep_u").attr('name');
		 // alert(userid)
	
		  $.post(
				  'index.php?g=User&m=Index&a=keep', 
				  {'id':id,
				   'module':module,
				   'url':url,
				   'title':title,
				   
				  },
				  function(res){
					 if(res.length>1000){
						alert('您还未登录，请您先登录');
						 } else{
							 alert(res)
						      if(res=='收藏成功!'){
							  var keepnum=parseInt($(".keep_n"+id).html())+1;
							  $(".keep_n"+id).html(keepnum);
							  }
						 
						 }
					 
					});
	  
	}





</script>